﻿using Krypton.Navigator;
using Krypton.Toolkit;

using System.Windows.Forms;

namespace GNDView.Box
{
    public partial class HostForm : KryptonForm
    {
        #region         变量 start
        private bool isShowNavigatorMenua;// 是否显示导航菜单
        #endregion 变量 end

        #region         属性 start

        #endregion 属性 end

        #region         构造与析构 start
        public HostForm()
        {
            InitializeComponent();
        }
        #endregion 构造与析构 end

        #region         事件回调 start
        private void HostForm_Load(object sender, System.EventArgs e)
        {
            //kdm_Manager.ManageControl("Container", kp_Container);
            //kdm_Manager.ManageFloating(this);

            //var devLstPage = NewPage("设备列表",0, null);
            //kdm_Manager.AddAutoHiddenGroup("Container", Krypton.Docking.DockingEdge.Right, new[] { devLstPage });
            //kdm.AddAutoHiddenGroup("Container", Krypton.Docking.DockingEdge.Bottom,);
        }

        private void buttonCollspe_Click(object sender, System.EventArgs e)
        {
            if (isShowNavigatorMenua)
            {
                kryptonNavigator.NavigatorMode = NavigatorMode.HeaderBarCheckButtonGroup;
                buttonCollspe.TypeRestricted = PaletteNavButtonSpecStyle.ArrowLeft;
                isShowNavigatorMenua = false;
            }
            else
            {
                kryptonNavigator.NavigatorMode = NavigatorMode.HeaderBarCheckButtonOnly;
                buttonCollspe.TypeRestricted = PaletteNavButtonSpecStyle.ArrowRight;
                isShowNavigatorMenua = true;
            }
        }
        #endregion 事件回调 end

        #region         公开方法 start

        #endregion 公开方法 end

        #region         私有方法 start
        private KryptonPage NewPage(string name, int image, Control content)
        {
            KryptonPage p = new KryptonPage
            {
                Text = name,
                TextTitle = name,
                TextDescription = name,
                //ImageSmall = (Bitmap)imageListSmall.Images[image]
            };

            // Add the control for display inside the page
            //content.Dock = DockStyle.Fill;
            //p.Controls.Add(content);
            //p.MinimumSize = content.MinimumSize;
            return p;
        }
        #endregion 私有方法 end
    }
}